Skip to content

Conversation

@Endilll
Copy link
Contributor

@Endilll Endilll commented Jan 5, 2025

This patch adds a rather simple test for CWG192. Parameter declarations of member functions are not complete-class contexts (unlike default arguments), so the example in the issue is ill-formed. Changes in CWG1352 which resolved the issue, are superseded by the notion of complete-class context (https://eel.is/c++draft/class.mem#def:complete-class_context).

@Endilll Endilll added clang Clang issues not falling into any other category c++ labels Jan 5, 2025
@Endilll Endilll requested review from cor3ntin and shafik January 5, 2025 06:49
@llvmbot
Copy link
Member

llvmbot commented Jan 5, 2025

@llvm/pr-subscribers-clang

Author: Vlad Serebrennikov (Endilll)

Changes

This patch adds a rather simple test for CWG192. Parameter declarations of member functions are not complete-class contexts (unlike default arguments), so the example in the issue is ill-formed. Changes in CWG1352 which resolved the issue, are superseded by the notion of complete-class context (https://eel.is/c++draft/class.mem#def:complete-class_context).


Full diff: https://github.com/llvm/llvm-project/pull/121679.diff

2 Files Affected:

  • (modified) clang/test/CXX/drs/cwg1xx.cpp (+8)
  • (modified) clang/www/cxx_dr_status.html (+1-1)
diff --git a/clang/test/CXX/drs/cwg1xx.cpp b/clang/test/CXX/drs/cwg1xx.cpp
index 6aec8b65c91f12..fb39da04b2df39 100644
--- a/clang/test/CXX/drs/cwg1xx.cpp
+++ b/clang/test/CXX/drs/cwg1xx.cpp
@@ -1347,6 +1347,14 @@ namespace cwg191 { // cwg191: yes
   }
 }
 
+namespace cwg192 { // cwg192: 2.7
+struct S {
+  void f(I i) { }
+  // expected-error@-1 {{unknown type name 'I'}}
+  typedef int I;
+};
+} // namespace cwg192
+
 // cwg193 is in cwg193.cpp
 
 namespace cwg194 { // cwg194: yes
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index c069e155fd547c..68e2dcdf71253b 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -1197,7 +1197,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
     <td><a href="https://cplusplus.github.io/CWG/issues/192.html">192</a></td>
     <td>NAD</td>
     <td>Name lookup in parameters</td>
-    <td class="unknown" align="center">Unknown</td>
+    <td class="full" align="center">Clang 2.7</td>
   </tr>
   <tr id="193">
     <td><a href="https://cplusplus.github.io/CWG/issues/193.html">193</a></td>

@Endilll Endilll merged commit fbc198c into llvm:main Jan 5, 2025
11 checks passed
@Endilll Endilll deleted the cwg192 branch January 5, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants